home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #1
/
Amiga Plus 1995 #1.iso
/
fish-disketten
/
fish_901-910
/
d908
/
golded1
/
install
next >
Wrap
Text File
|
1994-12-13
|
27KB
|
1,094 lines
; $VER: GoldED 0.94
; Copyright ©1993 Dietmar Eilert - All Rights Reserved
(delopts "oknodelete" "force" "askuser")
(complete 0)
(set @default-dest "")
; set default language selection (catalogs) to 'none'
(set catalogs 0)
; sure we are running under a 2.04 ROM ?
(if (< (/ (getversion) 65536) 37)
(
(message "\n Sorry, this package requires OS v2.04 or better. \n")
(exit (quiet))
)
)
(if (exists "GoldED:" (noreq))
(set update (askchoice
(prompt (cat "\nGOLDED: assign detected...\n"))
(help (cat "\n"
" If you decide for updating your old installation \n"
" you won't be asked for directories. Directories \n"
" of your previous installation will be used. \n"
" \n"
" If you decide for removing your current GoldED \n"
" installation this script will try to delete \n"
" files introduced by a former GoldED installation.\n"
" However, this utility is not able to remove all \n"
" files related to GoldED. For example it won't \n"
" remove the reqtools library since this library \n"
" might be used by other applications, too. It \n"
" won't remove the QuickStarter since it doesn't \n"
" know where it has been placed. \n"
))
(default 1)
(choices
"install new"
"update existing GoldED"
"remove GoldED from your system"
)
))
)
; remove GoldED ?
(if (= update 2) (
(if (exists "GoldED:" (noreq))
(
(run "assign >NIL: oldged: GoldED:/")
(run "assign >NIL: HiSpeed: remove")
(run "assign >NIL: GoldED: remove")
(run "assign >NIL: GUIMake: remove")
(run "delete >NIL: oldged:GoldED all quiet force")
(run "delete >NIL: oldged:GoldED.info")
(if (exists "locale:catalogs/deutsch/GoldED.catalog" (noreq))
(run "delete >NIL: locale:catalogs/deutsch/GoldED.catalog")
)
(run "delete >NIL: sys:prefs/presets/GED_#? all quiet")
(run "delete >NIL: sys:prefs/presets/GoldED all quiet")
(if (exists "envarc:GoldED")
(run "delete >NIL: envarc:GoldED all quiet")
)
(run "delete >NIL: env:GoldED all quiet")
(run "delete >NIL: fonts:GoldED all quiet")
(run "delete >NIL: s:GUIMake.pref")
((startup
"GoldED"
(prompt "remove 'GoldED:' assign ?\n")
(help "You must have this assign removed !")
(command "; (removed)")
))
((startup
"HiSpeed"
(prompt "remove 'HiSpeed:' assign ?\n")
(help "You must have this assign removed !")
(command "; (removed)")
))
((startup
"GED_quick"
(prompt "remove quickstarter access ?\n")
(help "You must have this access removed !")
(command "; (removed)")
))
((startup
"GUIMake"
(prompt "remove GUIMake access ?\n")
(help "You must have this access removed !")
(command "; (removed)")
))
)
)
(exit (quiet))
))
; what parts should be installed ?
(if (= update 0) (
(set parts (askoptions
(prompt "\n What parts do you want to have installed ? \n")
(help (cat "\n"
" You should decide for a complete installation if \n"
" you are a novice user. Preferences files, manuals \n"
" & libraries are essential for running the editor \n"
" (e.g. the manual is referenced by GoldED's help \n"
" facility). \n"
" \n"
" The QuickStarter is a small (4 KB) GoldED front- \n"
" end. You can use it AS IF it were a real editor. \n"
" For example you might type 'ed letter' to edit the\n"
" file letter if the QuickStarter were named 'ed'. \n"
" The big advantage of a QuickStarter is its abilty \n"
" to pass a new job to an already running instance \n"
" of GoldED (if there is any). Needless to say that \n"
" this happens *very* fast. The QuickStarter may be \n"
" made resident (the main editor may not). \n"
" \n"
" Backups of your current settings (if available) \n"
" are made. No libraries will be overwritten unless \n"
" they are outdated. \n"
))
(choices
" main editor & manual"
" QuickStarter"
" libraries"
" support tools"
)
(default 255))
))
(set parts 255)
)
(complete 1)
(if (OR (IN parts 0) (IN parts 6)) (
(if (= update 1)
(if (> (getsize "golded:golded.info") 800)
(set icons 1)
(set icons 0)
)
((set icons (askchoice
(prompt "Select preferred icon type")
(choices
" med-res icons (pixel ratio 1:2)"
" hi-res icons (pixel ratio 1:1)"
)
(help (cat "\n"
" Select med-res if the pixel ratio of your preferred\n"
" screen resolution is approx. 1:2 (e.g. in 640*200 \n"
" mode the pixel width is half of pixel height). \n"
" Select hi-res if the pixel ratio of your preferred \n"
" resolution is approx. 1:1 (eg. 640*400 or 800*600).\n"
))
(default 1)
))
))
))
(complete 2)
; install the editor itself ?
(if (IN parts 0) (
(set reboot 1)
(if (= update 1)
(set target "golded:/")
((set target (askdir
(prompt " Where do you want to have the package installed ? \n")
(help (cat "\n"
" Simply select a directory (a root directory is \n"
" fine, too). I'm going to create a new directory \n"
" called 'GoldED' within the directory you specify. \n"
" You should select a directory which has an icon \n"
" attached to it (e.g. SYS:Utilities). \n"
" \n"
" The GoldED directory will keep several support \n"
" files/tools as well as the main editor. ARexx \n"
" macros related to GoldED are usually kept in a \n"
" subdirectory of GoldED. Furthermore the manuals \n"
" reside in GoldED. \n"
))
(default "SYS:TOOLS")
))
))
(set @default-dest target)
(complete 5)
(set targetsize (getdiskspace target))
(if (< targetsize 1000000) (
(if (<> (getdevice target) "RAM") (
(abort (cat "\n"
" This installation requires about 1 MB free on\n"
" the volume where you wish to install GoldED. \n"
" Please make this space available and then re-\n"
" install. \n"
))
))
))
(complete 10)
(copyfiles
(source "data/main")
(dest target)
(infos)
(all)
)
(complete 15)
(if (= icons 0)
(copyfiles
(source "data/Icons/GoldED")
(dest (tackon target "GoldED"))
(infos)
(all)
)
)
(run
(cat "assign GoldED: "
(tackon target "GoldED")
))
(complete 20)
(if (= update 1)
(
(set catalogs 3)
(if (exists "locale:catalogs/deutsch/golded.catalog" (noreq))
(
(set catalogs 1)
(delete "sys:catalogs/deutsch/golded.catalog")
)
)
)
((set catalogs (askoptions
(prompt "\n What catalogs do you want to have installed ? \n")
(choices
" English"
" German "
)
(help (cat "\n"
" Catalogs are required by OS2.1 or better to localize\n"
" GoldED, i.e. to make the editor use the language \n"
" selected by the locale preferences program (however \n"
" menus are not loacalized since menus are not part of\n"
" the editor itself). \n"
))
(default 3)
))
))
(if (not (exists "locale:" (noreq))) (
(makedir "sys:locale")
(makeassign "locale" "sys:locale")
))
(if (not (exists "locale:catalogs"))) (makedir "locale:catalogs")
(if (IN catalogs 0) (
(if (not (exists "locale:catalogs/deutsch"))) (makedir "locale:catalogs/deutsch")
(copyfiles
(source "data/catalogs/deutsch")
(dest "locale:catalogs/deutsch")
(all)
)
))
(if (= update 0)
(
(makeassign "GoldED" (tackon target "GoldED"))
(startup
"GoldED"
(prompt "Add 'GoldED:' assign to 's:user-startup' ? \n")
(help (cat "\n"
" This editor does support user menus, i.e. you can \n"
" set up own menu items of several types (scripts, \n"
" ARexx macros, DOS commands, ...). Thus ususally \n"
" external files have to be referenced. It is quite \n"
" convenient - and strongly recommended - to place \n"
" files related to GoldED in a symbolic directory \n"
" GoldED: (or one of its subdirectories). If you \n"
" don't set up an approbiate assign you will run \n"
" into TROUBLE. Nevertheless, the main editor itself\n"
" does not need any assign to run. Actually it does \n"
" not need any external file at all apart from its \n"
" config file (envarc:GOLDED/GOLDED.PREFS). \n"
" \n"
)
)
(command ("ASSIGN >NIL: GOLDED: %s " (tackon target "GoldED")))
))
)
))
(complete 25)
; install QuickStarter ?
(if (IN parts 1) (
(set progname (askchoice
(prompt " Choose a name for the QuickStarter")
(help (cat "\n"
" The QuickStarter is a small (4 KB) GoldED front- \n"
" end. You can use it AS IF it were a real editor. \n"
" For example you might type 'ed letter' to edit the\n"
" file letter if the QuickStarter were named 'ed'. \n"
" The big advantage of a QuickStarter is its abilty \n"
" to pass a new job to an already runnning instance \n"
" of GoldED (if there is any). This happens FAST. \n"
" \n"
" The QuickStarters default name is 'ED' but feel \n"
" free to choose any name you like. Personally, I \n"
" prefer to use 'ED' (replacing Commodore's ED). \n"
))
(choices
"GED"
"ED"
"(other)"
)
(default 1)
))
(complete 30)
(if (= progname 0) (set name "GED"))
(if (= progname 1) (set name "ED" ))
(if (= progname 2)
(set name (askstring
(prompt " Enter a name:\n")
(help (cat "\n"
" Any name (GED, ED, ...) will do. Existing files are \n"
" overwritten. If you decide for 'ED', the original ED\n"
" is lost (well, let's call it a gain :-) \n"
))
(default "ED")
))
)
(complete 35)
(set comdir (askdir
(prompt (cat "\n"
" Now let's place the QuickStarter within a valid \n"
" command directory. Select a directory: \n"
))
(help (cat "\n"
" You should select one of these directories if you \n"
" want to run the editor simply by typing its name, \n"
" no matter what your current path is: \n"
" \n"
" SYS:C, SYS:TOOLS, SYS:UTILITIES or SYS:SYSTEM \n"
" \n"
" If you choose ED as default name, you must either \n"
" place the quick starter into c: or delete the old \n"
" ED from c: to prevent race conditions. \n"
))
(default "C:")
))
(copyfiles
(source "data/main/GoldED/ED")
(dest comdir)
(newname name)
)
(run "resident >NIL: ED remove")
(startup
"GED_quick"
(prompt "\n Make QuickStarter resident ? \n")
(help (cat "\n"
" I would suggest to make the QuickStarter (4 KB) \n"
" resident - it will work faster. \n"
))
(command (cat "resident " (tackon comdir name) " pure"))
)
))
(complete 40)
; install presets ...
(if (IN parts 0) (
(set prefsdir "sys:prefs/presets/GoldED")
(if (exists prefsdir) (
(set bakdir "sys:prefs/presets/GED_BAK")
(if (exists bakdir) (
(while (exists bakdir) (
(set bakdir (cat bakdir "X"))
))
))
(complete 45)
(working "creating backup of old presets ...")
(complete 50)
(copyfiles
(source prefsdir)
(dest bakdir)
(nogauge)
(all)
)
(message (cat "\n"
"Backups of your old preferences have been written\n"
"to directory: "
bakdir
))
(run (cat "delete " prefsdir " all quiet"))
))
(complete 55)
(copyfiles
(source "data/presets")
(dest "sys:prefs/presets")
(all)
)
(complete 60)
; install config file ...
(set language 255)
; already a language selected (while installing main editor) ?
(if (= catalogs 1) (set language 0))
(if (= catalogs 2) (set language 1))
(if (= language 255) (
(set language (askchoice
(prompt "\n Choose default menu definition file: \n")
(choices
"English"
"Deutsch"
)
(help (cat "\n"
" GoldED is localized (i.e. uses the locale library \n"
" of WB2.1/3.x) as far as its internal textes are \n"
" concerned. Since menus are not part of the editor \n"
" itself they are not localized. Instead, the user may\n"
" specify a menu definition file to get menus in his/ \n"
" her preferred language. \n"
))
(default 0)
))
))
(set guimake (askbool
(prompt "\n Install GUIMake's menu (©'93 Rico Krasowski) ?")
(help (cat "\n"
" GUIMake is a GUI driven compiler frontend for GoldED\n"
" (to be used instead of makefiles). Supports project \n"
" management and comfortable error handling (e.g. jump\n"
" to first error after compilation). Included with \n"
" kind permisssion of the author of GUIMake. \n"
" \n"
" Supported compiler(s) so far: unregistered DICE and \n"
" registered DICE. \n"
))
(default 1)
))
(if (= guimake 1)
(
(if (= language 0)
(set menufile "GUI_FactoryUS.men")
(set menufile "GUI_FactoryD.men" )
)
)
(
(if (= language 0)
(set menufile "FactoryUS.men")
(set menufile "FactoryD.men" )
)
)
)
(if (= (database "vblank") 50) (
(set vblank 1)
(set vblank 3)
))
(complete 61)
(set screen (askchoice
(prompt "\n Choose default screen resolution \n")
(choices
"custom screen NTSC"
"custom screen NTSC interlaced"
"custom screen PAL"
"custom screen PAL interlaced"
"workbench screen"
)
(default vblank)
(help (cat "\n"
" Decide for a default screen mode to be used when the\n"
" editor is started for the 1st time. I would suggest \n"
" to use a custom screen for this will make GoldED run\n"
" faster and look much nicer. \n"
))
))
(complete 62)
(if (= screen 4)
(set display "workbench.dsp")
(
(set mode (askchoice
(prompt "Select look & feel")
(choices
"Blue (2 colors, faaaast)"
"TKEd (4 colors, my favorite)"
"Sun (4 colors, pretty)"
"Night (4 colors, strange)"
"Ocean (4 colors, fresh)"
"Stone (2 colors, fast)"
)
(help (cat "\n"
" Suggestion: use a 2-color mode if your Amiga \n"
" isn't that fast (68000) but a four color mode \n"
" for any other Amiga. Be warned: There a many \n"
" more modes available from within GoldED :-) \n"
))
))
(if (= mode 0) (set display "Blue" ))
(if (= mode 1) (set display "TKEd" ))
(if (= mode 2) (set display "Sun" ))
(if (= mode 3) (set display "Night"))
(if (= mode 4) (set display "Ocean"))
(if (= mode 5) (set display "Stone"))
(if (or (= screen 0) (= screen 1))
(set display (cat display "_NTSC"))
(set display (cat display "_PAL" ))
)
(if (or (= screen 1) (= screen 3)) (
(set display (cat display "_LACE"))
))
(set display (cat display ".dsp"))
)
)
(complete 63)
(set printer (askchoice
(prompt "\n What printer do you own ? \n")
(choices
"DeskJet or similar (Olivetti, Fujitsu, ...)"
"Laser printer (PCL)"
"none/other"
)
(default 0)
(help "\n Simply select the printer model you own.")
))
(if (= printer 2)
(set prtfile "standard.prt" )
(set prtfile "DeskJetLQ.prt" )
)
(complete 64)
(set proglang (askchoice
(prompt "\n Select preferred programming language:\n")
(choices
"C"
"Pascal"
"Basic"
"other"
)
(default 0)
(help (cat "\n"
" GoldED offers smart indention after keywords like \n"
" IF. The indention scheme depends on your programming\n"
" language. Additionally, a C-dictionary is available \n"
" (required for AutoCompletion). \n"
))
))
(if (= proglang 0)
((set indention "C.ind")
(set dictionary "C.dic"))
((set indention "empty.ind")
(set dictionary "empty.dic"))
)
(if (= proglang 1) (set indention "Pascal.ind"))
(if (= proglang 2) (set indention "Basic.ind"))
(copyfiles
(source "data/envarc")
(dest "envarc:")
(infos)
(all)
)
(set prefs " data/presets/GoldED/")
(run (cat
"JOIN >CON:0/0/640/100/test/AUTO/WAIT/CLOSE "
(cat prefs "standard.msc")
(cat prefs "standard.key")
(cat prefs "empty.ref" )
(cat prefs display )
(cat prefs "standard.def")
(cat prefs prtfile )
(cat prefs "standard.tab")
(cat prefs menufile )
(cat prefs dictionary )
(cat prefs indention )
(cat prefs "standard.lay")
(cat prefs "empty.prj" )
" AS envarc:GoldED/GoldED.prefs"
))
(copyfiles
(source "envarc:GoldED")
(dest "env:GoldED")
(all)
(infos)
)
(if (= icons 0)
(copyfiles
(source "data/Icons/Envarc")
(dest "envarc:")
(infos)
(all)
)
)
))
(complete 65)
(if (= update 0) (
; install libraries ?
(if (IN parts 2) (
(if (exists "support/reqtools")
(copylib (source "support/reqtools/reqtools.library") (dest "libs:"))
)
(if (exists "support/amigaguide")
(copylib (source "support/amigaguide/amigaguide.library") (dest "libs:"))
)
(if (exists "support/xpk") (
(copylib (source "support/xpk/xpkmaster.library") (dest "libs:"))
(if (not (exists "libs:compressors"))
(copyfiles
(source "support/xpk/compressors")
(dest "libs:compressors")
(all)
)
)
))
))
(complete 70)
; install fonts
(copyfiles
(source "data/fonts" )
(dest "fonts:")
(all)
(nogauge)
)
))
(complete 75)
; process second disk ...
(if (exists "/GoldED2")
(set from "/GoldED2/")
(
(if (= @app-name "GoldED/FF") (
(while (not (exists "df0:GoldED2.info"))
(
(message (cat "\n"
" Please insert part II of the GoldED distribution\n"
" into disk drive df0: ... \n"
))
)
)
(makeassign "GOLDED2" "df0:")
))
(set from "GoldED2:GoldEd2/" )
)
)
; install main editor (2nd part) ?
(if (IN parts 0) (
(copyfiles
(source (cat from "data/main"))
(dest target)
(all)
)
))
; install tools ?
(if (IN parts 3) (
(set drive "GoldED:Tools")
(complete 80)
(if (= "RAM" (getdevice drive))
(set drive "RAM:")
)
(if (exists "GUIMake:" (noreq)) (set guimake 1))
(if (= guimake 1) (
(set target (tackon drive "GUIMake"))
((startup
"GUIMake"
(prompt "\n Add 'GUIMake:' assign to 's:user-startup' ? \n")
(help (cat "\n"
" A 'GUIMake:' assign is required if you want to use\n"
" GUIMake (GUI driven compiler frontend). \n"
))
(command ("ASSIGN >NIL: GUIMake: %s " target))
))
))
(set target (tackon drive "HiSpeed"))
(run (cat "assign HISPEED: " target))
(if (= update 0) (
(run (cat "delete " target "/#? ALL QUIET" ))
(copyfiles
(source (cat from "tools/HiSpeed"))
(dest target)
(all)
(infos)
)
(copyfiles (source (cat from "tools/HiSpeed.info")) (infos) (dest drive))
))
(complete 85)
(makeassign "HISPEED" target)
(if (= update 0) (
((startup
"HISPEED"
(prompt "\n Add 'HISPEED:' assign to 's:user-startup' ? \n")
(help (cat "\n"
" A 'HISPEED:' assign is required if you want to run\n"
" HiSpeed without having to worry about the current \n"
" path (i.e. you won't have to CD to HiSpeed's dir).\n"
" However, this assignment is not required if you \n"
" don't intend to use the softfonts of this package.\n"
" \n"
))
(command ("ASSIGN >NIL: HISPEED: %s " target))
))
(delete "envarc:hispeed.config")
(delete "s:hispeed.config")
(if (exists "envarc:HiSpeed")
(delete "envarc:HiSpeed/HiSpeed.prefs")
(makedir "envarc:HiSpeed")
)
))
(copyfiles
(source (cat from "tools/envarc"))
(dest "envarc:")
(infos)
(all)
)
(complete 90)
(copyfiles
(source (cat from "tools"))
(dest "GoldED:Tools")
(pattern "(U|ED|PRJ|REC|GUI)#?")
(infos)
)
(makeassign "GUIMake" "GoldED:tools/guimake")
(copyfiles
(source (cat from "tools/GUIMake/s/GUIMake.pref"))
(dest "s:")
)
(complete 95)
(if (= icons 0) (
(copyfiles
(source "data/Icons/HiSpeed")
(dest target)
(infos)
(all)
)
(copyfiles
(source "data/Icons/Unlock")
(dest "GoldED:Tools/Unlock")
(infos)
(all)
)
(copyfiles
(source "data/Icons/EDSource")
(dest "GoldED:Tools/EDSource")
(infos)
(all)
)
(copyfiles
(source "data/Icons/PRJSource")
(dest "GoldED:Tools/PRJSource")
(infos)
(all)
)
(copyfiles
(source "data/Icons/Recover")
(dest "GoldED:Tools/Recover")
(infos)
(all)
)
(copyfiles
(source "data/Icons/GUIMake")
(dest "GoldED:Tools/GUIMake")
(infos)
(all)
)
))
))
(if (exists "sys:wbstartup/mfr") (
(message (cat "\n"
"Warning (MFR detected): Don't use MFR (Magic file \n"
"requester) in order to replace the reqtools requester\n"
"supported by GED: MFR will cause enforcer hits, i.e. \n"
"possible break the system. Addtionally, some features\n"
"(e.g. select-directory mode) are not supported by \n"
"MFR. \n"
))
))
(if (not (= update 2))
(message (cat "\n"
"Installation complete. You should now reboot your \n"
"machine. \n"
))
)
(complete 100)